//
//  OcObj.h
//  TestSwiftCallOCOCCallC++
//
//  Created by CityDo on 2019/8/27.
//  Copyright © 2019 CityDo. All rights reserved.
//



#import <AVFoundation/AVFoundation.h>
#import <Foundation/Foundation.h>
//#include <opencv2/core/core.hpp>

//#import "NormalizeImage.hpp"

NS_ASSUME_NONNULL_BEGIN

@interface OcObj : NSObject

-(void)testLog;
-(void)initNormImg:(NSString *)strDetectorFile SettingsFile:(NSString *) strSettingsFile;
-(UIImage *)imageNormImg:(CVPixelBufferRef)pixelBuffer;
-(CVPixelBufferRef)imageNormImgToPixelBuffer:(CVPixelBufferRef)pixelBuffer;
-(NSData *)commonNormImgToBuffer:(CVPixelBufferRef)pixelBuffer;


-(NSDictionary *)normImgToBuffer:(CVPixelBufferRef)pixelBuffer;

-(NSDictionary *)normImgToBuffer:(CVPixelBufferRef)pixelBuffer With:(NSArray *)preBox;

-(NSArray *) getAffineLandmarks:(NSArray *) points;


-(UIImage *)imageFromCVPixelBufferRef0:(CVPixelBufferRef)pixelBuffer;
-(UIImage *)imageFromCVPixelBufferRef1:(CVPixelBufferRef)pixelBuffer;
-(UIImage *)imageFromCVPixelBufferRef2:(CVPixelBufferRef)pixelBuffer;
-(void)saveImageToDomainsWithDirectorystringByAppendingPathComponent:(NSString *)suffix WithImage:(UIImage *)image;
-(UIImage*)imageFromPixelBuffer:(CMSampleBufferRef)p ;


//-(void)saveImageToDocumentsPath:(NSString *) suffix With: (cv::Mat) mat;
//-(void)Image_normImg:(CVPixelBufferRef)pixelBuffer;
//-(UIImage *) matFromImageBuffer: (CVImageBufferRef) buffer;

@end

NS_ASSUME_NONNULL_END
